# Contributor: Daniel Everett <deverett@gmail.com>
# Maintainer: Daniel Everett <deverett@gmail.com>
pkgname=py3-fido2
_pkgname=${pkgname#py3-}
pkgver=1.1.2
pkgrel=1
pkgdesc="Provides library functionality for FIDO 2.0, including communication with a device over USB"
url="https://developers.yubico.com/python-fido2/"
arch="noarch"
license="BSD-2-Clause AND Apache-2.0 AND MPL-2.0"
depends="python3 py3-cryptography"
makedepends="
	py3-gpep517
	py3-poetry-core
	"
checkdepends="
	py3-cparser
	py3-mock
	py3-pyfakefs
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m unittest discover -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
db62cfc05a8daa2224bae820ba3174f22d1e4711643d52f549e738e4af14537f92ca950c3904660f3bb360d6aadf236c9b19b8ac4816d99467a43e239b7c219a  fido2-1.1.2.tar.gz
"
